package com.atguigu.utils;

public class Tuple2<T0, T1> {
    public T0 f0;
    public T1 f1;

    public Tuple2(T0 f0, T1 f1) {
        this.f0 = f0;
        this.f1 = f1;
    }

    public static <T0, T1> Tuple2<T0, T1> of(T0 f0, T1 f1) {
        return new Tuple2<>(f0, f1);
    }

    @Override
    public String toString() {
        return "Tuple2{" +
                "f0=" + f0 +
                ", f1=" + f1 +
                '}';
    }

    public static void main(String[] args) {
        Tuple2<Long, Long> tuple2 = Tuple2.of(1L, 2L);
        System.out.println(tuple2);
    }
}
